<%@page import="com.model.CourseInfo"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>学生管理系统</title>
</head>
<jsp:include page="islogin.jsp"></jsp:include>
<body style="padding-top:20px;">
<jsp:useBean id="courseInfoServer" class="com.jdbc.DAO.CourseInfoServer"></jsp:useBean>
<%
    List<CourseInfo> courseInfos = courseInfoServer.queryAllCourse();
		/* out.print(s.size()); */
%>
<center>
    <table  cellpadding="16" style="margin-top:20px;">
        <tr>
            <th>课程号</th><th>课程名</th><th>课程学分</th><th>授课教师</th>
        </tr>
        <%
            int i=0;
            for(CourseInfo courseInfo : courseInfos){
        %>
        <tr  <% if(i%2==0){%> bgcolor="#f4f4f4" <% } %>>
            <td><%=courseInfo.getCourse_id() %></td>
            <td><%=courseInfo.getCourse_name() %></td>
            <td><%=courseInfo.getCourse_credit() %></td>
            <td><%=courseInfo.getCourse_teacher() %></td>
            <td><a href="modifyOneCourse.jsp?course_id=<%=courseInfo.getCourse_id() %>">修改信息</a></td>
        </tr>
        <%
                i++;
            }
        %>

    </table>
</center>

</body>
</html>